package exception;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.awt.*;
import java.io.IOException;

public class ThrowsDemo {
    public static void main(String[] args) {
        Student1 hz = new Student1();
        try {
            hz.setAge(250);
            System.out.println("黄总今年"+hz.getAge()+"岁了");
        } catch (IllegalAgeException e) {
            //e.printStackTrace();
            System.out.println(e.getMessage());
        }

    }
}
class ThrowsDemo2{
    public void some() throws IOException, AWTException{}
}

class SubClass extends ThrowsDemo2{
    //public void some() throws IOException, AWTException {
    //}
    //public void some() throws IOException{}
    //public void some() throws Exception
}